package com.xukang.demo.feign;

import com.xukang.demo.entity.ProjectInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * feign 接口调用封装
 * feign 书写方式以SpringMVC  接口形式
 * name = 指定服务注册名
 */
@FeignClient(name = "SpringEureka-demo2",fallback = ServiceFallback.class)
public interface ApiFeign2 {

    /**
     * 所调用的接口
     */
    @RequestMapping("/getInfo")
    public ProjectInfo getInfo();

    @RequestMapping("/getInfoTimeout")
    public ProjectInfo getInfoTimeout();
}
